package com.thinkinjava.exception;

public class InheritingExceptions {

	public void f() throws SimpleException {
		System.out.println("throw SimpleException form f()");
		throw new SimpleException();
	}

	public static void main(String[] args) {
		InheritingExceptions ie = new InheritingExceptions();
		try {
			ie.f();
		} catch (SimpleException e) {
			System.err.println("Caught it!");
		}
	}

}

class SimpleException extends Exception {
}